<!-- Begin prefs/prefs.tpl -->
<form method="post" action="?module=prefs&update=true" enctype="multipart/form-data">

{opentable}

{titlebar colspan=2 title=$lg->profile}
<tr><td><input type="submit" class="button" value={$lg->save} /><td></tr>
{titlebar colspan=2 title=$lg->personal_data}

<tr>{$fname}</tr>
<tr>{$lname}</tr>
<tr>{$addrs}</tr>
<tr>{$ncity}</tr>
<tr>
<td class="sectiontableentry2"  align="right" valign="middle">{$lg->tel}</td>
<td class="sectiontableentry1" ><input type="text" size="32" maxlength="32" name="phone" value="{$user.telephone}" /></td>
</tr>
<tr>{$email}</tr>
<tr>
<td class="sectiontableentry2" align="right" valign="middle">{$lg->sms}</td>
<td class="sectiontableentry1" ><input type="text" size="32" maxlength="64" name="sms" value="{$user.sms}" /></td>
</tr>
<tr>
<td class="sectiontableentry2" align="right" valign="middle">{$lg->language}</td>
<td class="sectiontableentry1" >
<select name="lang">
{if is_array($languages)}
{foreach from=$languages item=language}
<option value="{$language}"{if $language eq $user.language} selected="selected"{/if}>{$language|capitalize|replace:"_":" "}</option>
{/foreach}
{/if}
</select>
</td>

{if is_employee($smarty.session.userid)}
<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->assets}</td>
<td class="sectiontableentry1"  width="70%"><a href="?module=users&action=assets&uid={$user.userid}">{$lg->list}</a></td>
</tr>
{/if}
<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->photo}</td>
<td class="sectiontableentry1" width="70%">
<img id="photo" name="photo" src="{$src}" width="80" height="100" border="0"  alt="{$lg->my_photo}" >
<input type="file" name="upload"  id="upload" onchange="load_img();" />
</td>
</tr>

{titlebar colspan=2 title=$lg->password}
<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->old_password}</td>
<td class="sectiontableentry1" width="70%"><input type="password" size="32" maxlength="32" name="oldpass" /></td>
</tr>
<tr>
<td class="sectiontableentry2"  align="right" valign="middle">{$lg->new_password}</td>
<td class="sectiontableentry1" ><input type="password" size="32" maxlength="32" name="newpass" /></td>
</tr>
<tr>
<td class="sectiontableentry2"  align="right" valign="middle">{$lg->confirm_password}</td>
<td class="sectiontableentry1" ><input type="password" size="32" maxlength="32" name="confirm" /></td>
</tr>

{titlebar colspan=2 title=$lg->user_options}

<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->hide_header}</td>
<td class="sectiontableentry1"  width="70%"><input type="checkbox" name="hideheader" {if $smarty.session.prefs.hide_header eq "t"} checked="checked"{/if} /></td>
</tr>

<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->email_notify}</td>
<td class="sectiontableentry1" width="70%">
<table width="100%" cellpadding="2" cellspacing="0">
<td width="50%" style="border: none;"><input type="checkbox" name="notifyci"{if $smarty.session.prefs.notify_create_issue eq "t" or $smarty.post.notify_create_issue eq "on"} checked="checked"{/if} />{$lg->issue_new}</td>
<td width="50%" style="border: none;"><input type="checkbox" name="notifymi"{if $smarty.session.prefs.notify_modif_issue eq "t" or $smarty.post.notify_modif_issue eq "on"} checked="checked"{/if} />{$lg->issue_mod}</td>
</table>
</td>
</tr>
<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->allow_notify}</td>
<td class="sectiontableentry1"  width="70%"><input type="checkbox" name="notify" {if $user.notify eq "t"} checked="checked"{/if} /></td>
</tr>
<tr>
<td class="sectiontableentry2" width="30%" align="right" valign="middle">[{$lg->search_results}] {$lg->sort_by}</td>
<td class="sectiontableentry1" width="70%">
<select name="sort_by">
{foreach from=$issue_fields item=field}
{if $field.field ne "flags"}
<option value="{$field.field}"{if $field.field eq $smarty.session.prefs.sort_by} selected="selected"{/if}>{$field.name}</option>
{/if}
{/foreach}
</select>
</td>

<tr class="sectiontableentry1">
<td class="sectiontableentry2" width="30%" align="right" valign="middle">[{$lg->search_results}] {$lg->show_fields}</td>
<td class="sectiontableentry1" width="70%">
<table width="100%" cellpadding="2" cellspacing="0">
{php}$col = 0;{/php}
	{foreach from=$issue_fields item=field}
		{php}if ($col == 0) { print "<tr class=\"data\">\n"; }{/php}
		<td width="25%" style="border: none;">
		<input type="checkbox" name="fields[]" value="{$field.field}"{if $field.value eq "t"} checked="checked"{/if} />
		{$field.name}
		</td>
		{php}$col++; if ($col == 4) { print "</tr>\n"; $col = 0; }{/php}
	{/foreach}
</table>
</td>
</tr>

{titlebar colspan=2 title=$lg->bookmarks_menu}
<tr class="sectiontableheader">
<td>Text</td>
<td>Link</td>
</tr>
{if is_array($menu_items)}
{foreach from=$menu_items item=menu}
<tr class="sectiontableentry2">
<td>{$menu.text}</td>
<td class="footer"> <a href="?module=prefs&mid={$menu.mid}"><img src="{$smarty.env.imgs.delete}" border="0" alt="Remove" /></a> {$menu.url}</td>
</tr>
{/foreach}
{/if}
<tr class="sectiontableentry1">
<td><input type="text" size="16" name="new_text" style="width: 98%;" /></td>
<td><input type="text" size="32" name="new_link" style="width: 98%;" /></td>
</tr>

{titlebar colspan=2 title=$lg->other_options}
<tr>{$blk_ootpt}</tr>
<!--
<td class="sectiontableentry2" width="30%" align="right" valign="middle">{$lg->date_format}</td>
<td class="sectiontableentry1" width="70%">
<select name="dformat">
<option value="d/m/Y"{if $smarty.session.prefs.date_format eq "d/m/Y"} selected="selected"{/if}>Euro (dd/mm/yyyy)</option>
<option value="m/d/Y"{if $smarty.session.prefs.date_format eq "m/d/Y"} selected="selected"{/if}>US (mm/dd/yyyy)</option>
<option value="Y/m/d"{if $smarty.session.prefs.date_format eq "Y/m/d"} selected="selected"{/if}>Internat. (yyyy/mm/dd)</option>
</select>
</td>
-->
</table>

</form>

<!-- End prefs/prefs.tpl -->

